package com.garygyp.educms.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.garygyp.commonutils.R;
import com.garygyp.educms.entity.CrmBanner;
import com.garygyp.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * @author GaryGyp
 * @date 2022/5/16 22:20
 * @description  前台用户使用的
 */
@CrossOrigin
@RestController
@RequestMapping("/educms/bannerfront")
public class BannerFrontController {

    @Autowired
    private CrmBannerService bannerService;

    // 查询所有幻灯片banner
    @GetMapping("getAllBanner")
    public R getAllBanner() {
        List<CrmBanner> list = bannerService.selectAllBanner();
        return R.ok().data("list", list);
    }

}
